package com.gosophia.metadataEngine.dao.test.unit;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.transaction.TransactionConfiguration;

import com.gosophia.metadataEngine.dao.DataSourceInfoDao;
import com.gosophia.metadataEngine.entity.DataSourceInfo;
@ContextConfiguration(locations = { "classpath:applicationContext-it.xml",
"classpath:moduleContext.xml" })
@TransactionConfiguration(defaultRollback= true)
public class UTDataSourceInfoDao extends
        AbstractTransactionalJUnit4SpringContextTests {
    @Autowired
    private DataSourceInfoDao dataSourceInfoDao;
    /**
     * 添加
     */
    @Test
    public void testAddDataSourceInfo(){
        DataSourceInfo dsi = new DataSourceInfo();
        dsi.setDialect("true");
        dsi.setName("dao测试添加");
        dsi.setNote("备注");
        dataSourceInfoDao.save(dsi);
    }
    
}
